<!DOCTYPE html>
<html lang="zh-CN">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>文件上传</title>
<link rel="stylesheet" type="text/css" href="__PUBLIC__/css/bootstrap.min.css">
<link href="__PUBLIC__/css/font-awesome.css" rel="stylesheet">
<script src="__PUBLIC__/js/jquery.min.js"></script>
<style type="text/css">
.upload {
	max-width: 500px;
}
.autoflow-x {
	overflow-x: auto;
}
@media(max-width: 600px){
	.upload {
		width: 300px;
	}
}
</style>
</head>
<body>
<!-- 文件上传 -->
<div class="uploadfile center-block">
	<div class="the-Match" method="get" action="">
		<div class="autoflow-x">
			<table class="table">
				<tr style="background-color: #F2F3F7;">
						<th>ID</th>
						<th>赛事名称</th>
						<th>竞赛日期</th>
						<th>报名截止时间</th>
						<th>状态</th>
						<th>操作</th>
				</tr>
					<volist id="vol" name="all_gamelist">
					<form method="get" action="">
						<tr>
							<td>{$vol.all_id}<input type="hidden" name="aid" value="{$vol.all_id}"></td>
							<td>
								<div class="circle-name">{$vol.all_name}</div>
							</td>
							<td>{$vol.all_start}</td>
							<td>{$vol.all_e_time}</td>
							<th>
								<if condition="$vol.all_g_photo eq 0">未上传
								<else />已上传
								</if>
							</th>
							<td>
								<input type="hidden" name="sud" value="sud">
								<input type="submit" class="btn" value="上传文件" onclick="uploadfile()" />
							</td>
						</tr>
					</form>
					</volist>		
			</table>
		</div>
	</div>
	<form class="center-block autowidth upload" action="__URL__/upload" method="post" enctype="multipart/form-data">
		<div class="form-group">
			<label>赛程上传</label>
			<div class="input-group center-block">
				<div class="changemodul">{$allId}
					<input class="form-control" type="file" name="game"/>
				</div>
			</div>
		</div>
		<div class="form-group">
			<label>交通路线上传</label>
			<div class="input-group center-block">
				<div class="changemodul">
					<input class="form-control" type="file" name="traffic"/>
				</div>
			</div>
		</div>
		<div class="form-group">
			<label>住宿指南上传</label>
			<div class="input-group center-block">
				<div class="changemodul">
					<input class="form-control" type="file" name="guide"/>
				</div>
			</div>
		</div>
		<div class="form-group">
			<label>赛场平面图上传</label>
			<div class="input-group center-block">
				<div class="changemodul">
					<input class="form-control" type="file" name="place"/>
				</div>
			</div>
		</div>
		<div style="width: 70%;overflow: hidden;" class="center-block">
			<input type="hidden" name="allid" value="{$aid}">
			<input type="submit" class="btn btn-info center-block" value="提交">
		</div>
	</form>
</div>
<script type="text/javascript">
	var up = {$up};
	function uploadFile(){
		if (up == 1) {
			$(".upload").show();
			$(".the-Match").hide();
		}
		if (up == -1) {
			$(".the-Match").show();
			$(".upload").hide();
		}
	}
	uploadFile();
</script>
</body>
</html>